﻿using EasyHttp.Http;
using System;

namespace EasyHttp.Test
{
    class Program
    {
        static void Main(string[] args)
        {


            HttpClient client = new HttpClient();
            client.Request.Timeout = 600000;
            //client.Request.CharacterSet
            client.Request.ContentType = "text/html";
            client.Request.AcceptEncoding = "text/html; default";

            var response = client.Get("http://www.ooopic.com/pic_27289588.html");
            Console.Write(response.RawText);

            //string html = response.RawText;
            //FindElement find = new FindElement(html);

            //var inode = find.ByXPath("//ul[@class='info-r-m orgR-b-border']");
            //if (inode != null)
            //{
            //    Console.WriteLine(inode.InnerHtml);
            //    Console.WriteLine("-------------------------------------------------------");
            //    foreach (var fd in inode.ChildNodes)
            //    {
            //        Console.WriteLine(fd.InnerHtml);
            //        Console.WriteLine(fd.ChildNodes[0].InnerText);



            //        //格式
            //        //var fnode = fd.Element("//i");
            //        //if (fnode.InnerText.StartsWith("格式"))
            //        //{
            //        //    Console.WriteLine(fd.Element("//b").InnerText.ToUpper());
            //        //    continue;
            //        //}
            //    }
            //}

            Console.ReadKey();
        }

    }
}
